<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>节点移动</title>
    <style>
        .all{
            display: flex;
        }
        select{
            width: 150px;
            height:200px;
        }
        .btn{
            width: 50px;
        }
    </style>
</head>
<body>
    <div class="all">
        <select id="leftSelect" multiple>
            <option value="">张飞</option>
            <option value="">关羽</option>
            <option value="">刘备</option>
            <option value="">曹操</option>
            <option value="">诸葛亮</option>
        </select>
        <div class="btn">
            <input id="moveToRight" type="button" value=">">
            <input type="button" value=">>">
            <input type="button" value="<">
            <input type="button" value="<<">
        </div>
        <select id="rightSelect" multiple></select>
        <div class="btn">
            <input type="button" value="up">
            <input type="button" value="down">
        </div>
    </div>
    <script src="../js/jquery-1.12.4.min.js"></script>
    <script>
       $("#moveToRight").click(function(){
           $("#rightSelect").append($("#leftSelect>option:selected"));
           $("#rightSelect>option").prop("selected",false);
       });
       $("[value=down]").click(function(){
           $("#rightSelect>option:selected:last").next().after($("#rightSelect>option:selected"));
       });
    </script>
</body>
</html>